package demo3;

public class CourseType {
    private String typeName;
    private boolean isActive;

    public CourseType(String typeName, boolean isActive) {
        this.typeName = typeName;
        this.isActive = isActive;
    }

    public boolean canDelete() {
        return !this.isActive;
    }

    public void displayAllTypes() {
        System.out.println("类型名称: " + this.typeName);
        System.out.println("是否停用: " + (this.isActive ? "否" : "是"));
    }

    // ... getter和setter方法 ...
}